//
//  Student.m
//  OcDay1Homework
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "Student.h"

@implementation Student
//name的setter方法
-(void)setName:(NSString *)name{
    _name = name;
}
//name的getter方法
-(NSString *)name{
    return _name;
}
//gender的setter方法
-(void)setGender:(NSString *)gender{
    _gender = gender;
}
//gender的getter方法
-(NSString *)gender{
    return _gender;
}
//age的setter方法
-(void)setAge:(NSInteger)age{
    _age = age;
}
//age的getter方法
-(NSInteger)age{
    return _age;
}
//number的setter方法
-(void)setNumber:(NSInteger)number{
    _number = number;
}
//number的getter方法
-(NSInteger)number{
    return _number;
}
//输出方法
-(void)myPrint{
    NSLog(@"%@ %@ %ld %ld",_name, _gender, _age, _number);
}
//自定义初始化方法
-(instancetype)initWithName:(NSString *)name withGender:(NSString *)gender withAge:(NSInteger)age withNumber:(NSInteger)number{
    self = [super init];
    if(self) {
        _name = name;
        _gender = gender;
        _age = age;
        _number = number;
    }
    return self;
}


@end
